﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true" CodeBehind="workPlanFView.aspx.cs" Inherits="WEB.workPlan.workPlanFView" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
        <!--日期控件-->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
        将来业务
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p style="text-align: center">
        &nbsp;</p>
    <p style="text-align: center">
        时间范围：<asp:TextBox ID="tbTimestart" runat="server"></asp:TextBox>
        至<asp:TextBox ID="tbTimestop" runat="server"></asp:TextBox>
        <asp:DropDownList ID="ddlasc" runat="server" AutoPostBack="True" >
            <asp:ListItem Value="asc">升序</asp:ListItem>
            <asp:ListItem Value="desc">降序</asp:ListItem>
        </asp:DropDownList><br/>
        <asp:DropDownList ID="ddlQuery" runat="server">
            <asp:ListItem Value="customerName">客户名</asp:ListItem>
            <asp:ListItem Value="goodsName">货名</asp:ListItem>
            <asp:ListItem Value="workMan">执行人</asp:ListItem>
            <asp:ListItem Value="shipName">船名</asp:ListItem>
        </asp:DropDownList>
        <asp:TextBox ID="tbQuery" runat="server"></asp:TextBox>
        
        <asp:Button ID="btnQuery" runat="server" Text="查询" onclick="btnQuery_Click" 
            CssClass="Submit_Query" />
    </p>
    <p style="text-align: center">
        <asp:GridView ID="gvPlan" runat="server" AutoGenerateColumns="False" 
            BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="3px" 
            CellPadding="4" ForeColor="Black" GridLines="Vertical" 
            onrowcommand="gvPlan_RowCommand" onrowdatabound="gvPlan_RowDataBound" 
            onpageindexchanged="btnQuery_Click" DataKeyNames="ID" AllowPaging="True" 
            onpageindexchanging="gvPlan_PageIndexChanging" CssClass="distance">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="编号" Visible="False" />
                <asp:ButtonField ButtonType="Button" Text="修改" CommandName="Alter" >
                </asp:ButtonField>
                <asp:BoundField DataField="planDate" HeaderText="计划日期" 
                    DataFormatString="{0:d}" />
                <asp:BoundField DataField="customerName" HeaderText="客户名" />
                <asp:BoundField DataField="goodsName" HeaderText="货名" />
                <asp:BoundField DataField="No" HeaderText="数量" />
                <asp:BoundField DataField="shipName" HeaderText="船名" />
                <asp:BoundField DataField="job" HeaderText="工作内容" />
                <asp:BoundField DataField="note" HeaderText="注意事项" />
                <asp:BoundField DataField="workMan" HeaderText="执行人" />
                <asp:BoundField DataField="remark" HeaderText="备注" />
                <asp:TemplateField HeaderText="状态">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("states") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:DropDownList ID="ddl" runat="server" AutoPostBack="True">
                            <asp:ListItem Value="0">作废</asp:ListItem>
                            <asp:ListItem Value="1">未完成</asp:ListItem>
                            <asp:ListItem Value="2">完成</asp:ListItem>
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            
            <PagerTemplate>
                <br />
                <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
                到第<asp:TextBox runat="server" ID="inPageNum" Width="30px"></asp:TextBox>页
                <asp:Button ID="Button1" CommandName="go" runat="server" Text="GO" />
                <br />
            </PagerTemplate>
            
            
            
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Left" />
            <RowStyle BackColor="#F7F7DE" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FBFBF2" />
            <SortedAscendingHeaderStyle BackColor="#848384" />
            <SortedDescendingCellStyle BackColor="#EAEAD3" />
            <SortedDescendingHeaderStyle BackColor="#575357" />
        </asp:GridView>
    </p>
</asp:Content>
